{extend name="base" /}
{block name="body"}
<blockquote class="layui-elem-quote news_search">

<div class="layui-inline layui-form">
				

		 <div class="layui-input-inline search-form ">
        <select id="tid" name="tid" >
                   {volist name="topiccatelist" id="vo"}
    
    <option value="{$vo.id}" {if condition="$vo['id'] eq input('tid')"}selected{/if}>{$vo.name}</option>
    {/volist}
                        </select>
                         </div>
		    <a class="layui-btn search_btn"  id="search" data-url="{:es_url('topicList')}">查询</a>
		  
		</div>
<div class="layui-inline">
			<ob_link><a class="layui-btn layui-btn-danger batchDel" data-url="{:es_url('topicAlldel')}">批量删除</a></ob_link>
			
			<ob_link><a class="layui-btn layui-btn-danger batchSh"  tiperror="请选择需要审核的数据" tipconfirm="确定审核选中的信息？"  data-url="{:es_url('topicAllSh')}">批量审核</a></ob_link>
					<div class="layui-inline">
		<ob_link>
			<a data-title="更改分类"  tiperror="请选择需要更改分类的帖子" tipconfirm="确定更改选中帖子的分类？" data-url="{:es_url('yidong')}" class="layui-btn  tuisong_btn">移动帖子</a></ob_link>
						<ob_link>
		</div>
			
	
		</div>
</blockquote>
	<div class="layui-form users_list">
	  	<table class="layui-table">
				<thead>
                    <tr>
                      {notempty name='list'}
					<th width="5%" style="text-align:center"><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose" id="allChoose"></th>
					 {/notempty}
                       <th><a href="">标题</a></th>
                      <th>分类</th>
                     
                        <th>话题</th>
               
                         <th>发布者</th>
                 
                       <th>推荐</th>
                        <th>置顶</th>
                
                        <th>状态</th>
                      <th>时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                       {notempty name='list'}
                  <tbody class="users_content">
                    {foreach name="$list" item="vo"}
                    <tr>
                        <td width="5%" style="text-align:center"><input type="checkbox" name="checked" lay-skin="primary" lay-filter="choose" value="{$vo.id}"></td>
                       <td>{$vo.title}</td>
                      <td>{$vo.tid|get_topiccatename}</td>
                      
                       <td>{$vo.gidtext}</td>
                     
                        <td>{$vo.nickname}</td>
                     
                         <td><input type="checkbox" data-url="{:es_url('topicCstatus',['id'=>$vo['id']])}" name="choice" lay-skin="switch" lay-text="推荐|普通" lay-filter="switchTest"  value="{$vo['choice']}" {php}echo $vo['choice']==1 ? 'checked' : '';{/php}></td>
                         <td><input type="checkbox" data-url="{:es_url('topicCstatus',['id'=>$vo['id']])}" name="settop" lay-skin="switch" lay-text="置顶|普通" lay-filter="switchTest"  value="{$vo['settop']}" {php}echo $vo['settop']==1 ? 'checked' : '';{/php}></td>
                      
                          <td>{php}echo $vo['status']>0 ? '通过' : '待审核';{/php}</td>
                           <td>{$vo.create_time|friendlyDate}</td>
                        <td>
                               <ob_link><a data-title="编辑文档"  data-url="{:es_url('topicEdit',['id'=>$vo['id']])}" class="layui-btn layui-btn-xs users_edit"><i class="fa fa-edit"></i>编辑</a></ob_link>
                      <ob_link><a class="layui-btn layui-btn-danger layui-btn-xs cstatus" href="javascript:;"  data-url="{:es_url('topicSh', array('id' => $vo['id']))}" data-field="status" data-val="{$vo.status}"><i class="fa fa-gavel"></i> {php}echo $vo['status']>0 ? '禁用' : '审核';{/php}</a></ob_link>
                      <ob_link><a class="layui-btn layui-btn-danger layui-btn-xs users_del" href="javascript:;"  data-url="{:es_url('topicDel', array('id' => $vo['id']))}"><i class="fa fa-trash-o"></i> 删 除</a></ob_link>
                 
                      </td>
                    </tr>
                    {/foreach}
                    </tbody>
                      {else/}
       <tbody class="users_content">
       <tr class="odd"><td colspan="9" class="text-center" valign="top">{:webconfig('empty_list_describe')}</td></tr>
       </tbody>
      {/notempty}
                </table>
	</div>
			
{/block}
 {block name="page"}
<div class="btable-paged" >
<div class="layui-main">
	{$page}
</div>
</div>
 {/block}
